package com.loongtech.bi.manager.game;

import com.loongtech.bi.entity.game.EntityNewUserCountry;
import com.loongtech.core.jpa.manager.ManagerQueryCacheBase;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 新增用户职业
 * 
 */
@Service
public class NewUserCountryManager extends ManagerQueryCacheBase<EntityNewUserCountry> {
	private static final long serialVersionUID = 1L;

	public List<EntityNewUserCountry> getAllNewUserCountry(Date dateStart, Date dateEnd) {
		return findByQuery("from EntityNewUserCountry where day>=:dayStart and day<=:dayEnd and "
				+ "platformid = '0' and channelid = '0' and serverid = '0' ", "dayStart", dateStart, "dayEnd", dateEnd);
	}

	public class CountryGameData {
	    private int countryid;
        private Map<Integer, Integer> newRoleSchoolCounts;
        private int countryNewRole;
        private int allNewRole;

        public int getCountryid() {
            return countryid;
        }

        public void setCountryid(int countryid) {
            this.countryid = countryid;
        }

        public Map<Integer, Integer> getNewRoleSchoolCounts() {
            return newRoleSchoolCounts;
        }

        public void setNewRoleSchoolCounts(Map<Integer, Integer> newRoleSchoolCounts) {
            this.newRoleSchoolCounts = newRoleSchoolCounts;
        }

        public int getCountryNewRole() {
            return countryNewRole;
        }

        public void setCountryNewRole(int countryNewRole) {
            this.countryNewRole = countryNewRole;
        }

        public int getAllNewRole() {
            return allNewRole;
        }

        public void setAllNewRole(int allNewRole) {
            this.allNewRole = allNewRole;
        }
    }
}
